package com.meilai.project.service.business.building;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.controller.mini.dto.MiniSearchBuildingParams;
import com.meilai.project.controller.mini.vo.MiniBuildingVO;
import com.meilai.project.dto.business.building.BuildingAreaDTO;
import com.meilai.project.dto.business.building.DateRangeDTO;
import com.meilai.project.dto.business.building.MapPointDTO;
import com.meilai.project.dto.thirdPart.LocationPoint;
import com.meilai.project.entity.business.building.BuildingArea;
import com.meilai.project.vo.IdNameVO;
import com.meilai.project.vo.business.building.BuildingAreaDetailVO;
import com.meilai.project.vo.business.building.BuildingAreaWebBaseVO;
import com.meilai.project.vo.business.building.BuildingAreaWebMapVO;
import com.meilai.project.vo.business.building.BuildingAreaWebVO;
import com.meilai.project.vo.business.media.MediaTypeExtVO;
import com.meilai.project.vo.business.media.MediaTypeForBuildingTypeVO;
import com.meilai.project.vo.business.media.MediaTypeVO;
import com.meilai.project.vo.other.SearchAreaVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author 张驰
 * @date 2022/1/9 23:01
 */
public interface BuildingAreaService extends IService<BuildingArea> {

    List<MiniBuildingVO> listByConditionForMini(MiniSearchBuildingParams searchDTO);

    List<BuildingAreaWebBaseVO> listAll(String ad_code);

    List<IdNameVO> listAllSimple(String ad_code);

    // 分页
    Page<BuildingAreaWebVO> selectPageList(Integer current_page, Integer page_size,
                                           BuildingAreaDTO buildingArea);

    List<BuildingAreaWebMapVO> getListForMap(LocationPoint sw, LocationPoint ne, DateRangeDTO dateRange);

    boolean alinePointNum();

    boolean alinePointNum(Long id);

    boolean addOne(BuildingAreaDTO params);

    boolean editOne(BuildingAreaDTO params);

    boolean delOne(Long id);

    List<SearchAreaVO> selectSearchAreaVO();

    List<MediaTypeVO> getMediaTypes();

    List<MediaTypeForBuildingTypeVO> getMediaTypesForBuildingType();

    List<MediaTypeVO> getMediaTypesNotIncludeGasStation();

    List<MediaTypeExtVO> listMediaTypes();

    List<MediaTypeVO> getMediaTypesOfGasStation();

    BuildingAreaDetailVO getDetail(Long id);

    /**
     * 获取地图中心
     * 当有楼盘信息时，根据所有楼盘计算中心位置
     * 当没有楼盘时，根据公司信息中的pca_id，返回城市的中心位置
     */
    MapPointDTO getMapCenter(HttpServletRequest request);

    BuildingAreaWebVO one(Long id);

    void getBuildingImportExcel(HttpServletResponse response);

    List<Long> getSelectBuildingIds(MultipartFile file);

    void exportBuildingMediaPointExcel(HttpServletResponse response, List<Long> building_ids);

    void exportBuildingMediaPointExcelToOneExcel(HttpServletResponse response, List<Long> building_ids);
}
